execute as @n[tag=smithingTable.itemSlotInteraction,type=interaction,distance=..5] on attacker run tag @s add player
execute store result score #noItem temp run data get entity @n[tag=smithingTable.itemSlot,type=item_display,distance=..3] item.components."minecraft:custom_data".smithingTable.null

execute if score #noItem temp matches 0 run function vs:system/game_ctrol/smithing_table/slot/take_item-drop with entity @p[tag=player]

tag @p[tag=player] remove player
scoreboard players reset #noItem temp
data remove entity @n[tag=smithingTable.itemSlotInteraction,type=interaction,distance=..5] attack